Improve guidance for passkey implementations in Authentication Cheat …#2052
Improve guidance for passkey implementations in Authentication Cheat …#2052YK-03 wants to merge 4 commits intoOWASP:masterfrom
Conversation
|
minor lint errors: cheatsheets/Authentication_Cheat_Sheet.md:350 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] |
|
@jmanico please review this one too ;-) |
|
The role of the client’s underlying key manager (e.g., TPM on Windows or Secure Enclave on Apple devices) is indeed an important part of the passkey security model. I’ll update the guidance to explicitly mention these hardware-backed key stores so the explanation is clearer and more complete. |
…ure Enclave, Android Keystore)
There was a problem hiding this comment.
Pull request overview
This PR updates the Authentication Cheat Sheet’s passkey/FIDO2 guidance and cleans up a Markdown table, aiming to improve clarity around automated attack types and passkey key storage properties.
Changes:
- Reformats the “Protect Against Automated Attacks” table to standard Markdown table syntax.
- Expands the FIDO2/Passkeys subsection with a new “Hardware-backed Key Storage” subsection and revised FIDO2 wording.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| **FIDO2**: FIDO2 and WebAuthn, encompassing previous standards (UAF/U2F), form the foundation of modern **Passkeys** technology. Passkeys enable users to securely log in using local user verification (such as biometrics or device PINs), often with credential synchronization across devices. | ||
|
|
||
| #### Hardware-backed Key Storage |
There was a problem hiding this comment.
The PR description mentions adding a reference link to the Web Authentication API docs and recommending using well-maintained WebAuthn libraries/platform APIs, but this change only adds a new subsection and contains no such link or guidance. Either update this section to include the described recommendations/link, or adjust the PR description to match the actual changes.
| **FIDO2**: FIDO2 and WebAuthn, encompassing previous standards (UAF/U2F), form the foundation of modern **Passkeys** technology. Passkeys enable users to securely log in using local user verification (such as biometrics or device PINs), often with credential synchronization across devices. | ||
|
|
||
| #### Hardware-backed Key Storage | ||
|
|
||
| For platform passkeys, the private key is generated and stored by the operating system's secure key manager. Modern platforms typically provide hardware-backed protection for these keys, such as the Trusted Platform Module (TPM) on Windows, Secure Enclave on Apple devices, or the Android Keystore/StrongBox on Android. | ||
|
|
||
| The private key is non-exportable and remains on the user’s device. During authentication, the platform security module signs a server challenge using this key. This hardware-backed protection of private keys is a core security property of passkeys and WebAuthn. |
There was a problem hiding this comment.
Line 344 states passkeys often have credential synchronization across devices, but line 350 then states the private key "remains on the user’s device". These statements conflict for synced passkeys; please reword to distinguish device-bound vs synced passkeys (and avoid implying the private key never leaves a device in all cases).
| **FIDO2**: FIDO2 and WebAuthn, encompassing previous standards (UAF/U2F), form the foundation of modern **Passkeys** technology. Passkeys enable users to securely log in using local user verification (such as biometrics or device PINs), often with credential synchronization across devices. | |
| #### Hardware-backed Key Storage | |
| For platform passkeys, the private key is generated and stored by the operating system's secure key manager. Modern platforms typically provide hardware-backed protection for these keys, such as the Trusted Platform Module (TPM) on Windows, Secure Enclave on Apple devices, or the Android Keystore/StrongBox on Android. | |
| The private key is non-exportable and remains on the user’s device. During authentication, the platform security module signs a server challenge using this key. This hardware-backed protection of private keys is a core security property of passkeys and WebAuthn. | |
| **FIDO2**: FIDO2 and WebAuthn, encompassing previous standards (UAF/U2F), form the foundation of modern **Passkeys** technology. Passkeys enable users to securely log in using local user verification (such as biometrics or device PINs). Depending on the platform and configuration, passkeys may be device-bound (stored on a single authenticator) or multi-device/synced (securely synchronized between a user's devices). | |
| #### Hardware-backed Key Storage | |
| For platform passkeys, the private key is generated and stored by the operating system's secure key manager. Modern platforms typically provide hardware-backed protection for these keys, such as the Trusted Platform Module (TPM) on Windows, Secure Enclave on Apple devices, or the Android Keystore/StrongBox on Android. | |
| For device-bound passkeys, the private key is marked as non-exportable and is designed not to leave the authenticator on which it was created. For synced passkeys, copies of the private key (or equivalent secret) may be synchronized between a user's devices using platform-specific, typically end-to-end encrypted mechanisms, but are not exposed to relying parties or application code. During authentication, the platform security module signs a server challenge using this key material. This hardware-backed or otherwise strongly isolated protection of private keys is a core security property of passkeys and WebAuthn. |
|
@YK-03 can you respond to copilot review/suggestions? |
Avoid overgeneralizing hardware-backed guarantees. Clarify that not all implementations are hardware-backed and relying parties should not assume non-exportability without attestation verification. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
You're A Rockstar
Thank you for submitting a Pull Request (PR) to the Cheat Sheet Series.
Please make sure that for your contribution:
[TEXT](URL)Description
This PR improves the guidance in the FIDO2 / Passkeys section of the Authentication Cheat Sheet by recommending the use of well-maintained WebAuthn libraries or platform APIs instead of implementing authentication logic manually.
A reference link to the Web Authentication API (WebAuthn) documentation was also added to provide developers with an authoritative resource for implementing passkey-based authentication securely.
AI Tool Usage Disclosure (required for all PRs)
Thank you again for your contribution 😃